package cn.zye.msa;

import java.util.Random;

public class ais_ship {
	public ais_ship(int _id, String _shipName) {
		this.id = _id;
		this.shipName = _shipName;
		this.IMO = demoData.getRandomIMO();
		this.MMSI = demoData.getRandomMMSI();
		this.company = demoData.shipCompanys[new Random()
				.nextInt(demoData.shipCompanys.length)];
		this.online = new Random().nextInt(2) == 1 ? true : false;
	}

	public boolean isOnline() {
		return online;
	}

	public void setOnline(boolean online) {
		this.online = online;
	}

	public String toString() {
		return "{id:" + this.id + ",shipName:" + this.shipName + ",MMSI:"
				+ this.MMSI + ",IMO:" + this.IMO + ",company:" + this.company
				+ ",online:" + this.online + "}";
	}

	int id;
	String shipName;
	String MMSI;
	String IMO;
	String company;
	boolean online = false;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getShipName() {
		return shipName;
	}

	public void setShipName(String shipName) {
		this.shipName = shipName;
	}

	public String getMMSI() {
		return MMSI;
	}

	public void setMMSI(String mMSI) {
		MMSI = mMSI;
	}

	public String getIMO() {
		return IMO;
	}

	public void setIMO(String iMO) {
		IMO = iMO;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

}
